using Admin2505.Domain.Common;

namespace Admin2505.Domain.Reposoitories;
//通用接口
public interface IRepository<T>
{
    Task<IEnumerable<T>> GetAllAsync();
    Task<PageResultDto<T>> GetPagedAsync(int PageIndex,int PageSize);

    Task<T?> GetByIdAsync(Guid id);

    Task<T> CreateAsync(T entity);
    Task UpdateAsync(T entity);

    Task DeleteAsync(T entity);
    Task DeleteAsync(Guid id);
}